#! /usr/bin/env python
 
PACKAGE='dbw_mkz_twist_controller'

from dynamic_reconfigure.parameter_generator_catkin import *

gen = ParameterGenerator()

speed_enum = gen.enum( [gen.const("SPEED_MPS",  int_t, 0, ""),
                        gen.const("SPEED_MPH",  int_t, 1, ""),
                        gen.const("SPEED_KPH",  int_t, 2, ""),
                       ],"Speed units enumeration")
yaw_enum = gen.enum( [gen.const("YAW_RATE",   int_t, 0, ""),
                      gen.const("YAW_RADIUS", int_t, 1, ""),
                     ],"Yaw method enumeration")

#       Name                 Type         Description                         Default
gen.add("publish",           bool_t,   0, "Publish twist command",            False)

#       Name                 Type         Description                         Default   Min     Max
gen.add("speed_units",       int_t,    0, "Speed units (mps/mph/kph)",        0, edit_method = speed_enum)
gen.add("speed",             double_t, 0, "Target speed (variable units)",    0.0,      0.0,    150.0)

#       Name                 Type         Description                         Default   Min     Max
gen.add("yaw_method",        int_t,    0, "Yaw method (yaw_rate or radius)",  0, edit_method = yaw_enum)
gen.add("yaw_rate",          double_t, 0, "Target yaw rate (rad/s)",          0.0,     -3.0,    3.0)
gen.add("yaw_radius",        double_t, 0, "Target radius (1/m)",              1e9,     -1e9,    1e9)

#       Name                 Type         Description                         Default   Min     Max
gen.add("use_limits",        bool_t,   0, "Use limits",                       True)
gen.add("decel_max",         double_t, 0, "Deceleration limit (m/s^2)",       3.0,      0.0,    8.0)
gen.add("accel_max",         double_t, 0, "Acceleration limit (m/s^2)",       3.0,      0.0,    8.0)

exit(gen.generate(PACKAGE, PACKAGE, "TwistTest"))
